{% extends "base.html" %}

{% block extra_head %}
<script>
  $(function() {
    $('.smenu_item').click(function() {
      var url = '/content_types/' + this.id;
      $('#ct_viewer').load(url, null, function() {
        $('#ct_menu').hide('slow');
        $('#ct_viewer').show('slow');
        });
      });
    });
</script>
{% endblock %}

{% block mid %}
  <div id="ct_menu" class="smenu">
    {% for ct in registry %}
      <div id="{{ ct.name }}" class="smenu_item">
        <img src="/static/images/icons/{{ ct.name }}.png">
        <h1>{{ ct.name }}</h1>
        <p>{{ ct.desc }}</p>
      </div>
    {% endfor %}
    <div class="clearerer"></div>
  </div>

  <div id="ct_viewer" class="sviewer" style="display: none;">
  </div>
{% endblock %}
